
<form action="" class="form-horizontal" role="form">

  <div class="form-group">
    <label class="col-sm-2 control-label">热词</label>
    <div class="col-sm-3">
      <input type="text" class="form-control" name="keyword" placeholder="请输入热词" datatype="*" value="{$distributionShopHotWords.keyword}"/>
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">热词图片</label>
    <div class="col-sm-3">
		<input type="text" id="img-url" name="image" class="form-control margin-bottom" value="{$distributionShopHotWords['image']}"/>
		<input type="file" name="file_upload" id="image_upload" />
    </div>
  </div>
  
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-8">
      <a class="btn btn-default" onclick="javascript:history.go(-1)">返回上页</a>
	  <a class="btn btn-default" onclick="self.location=document.referrer">返回上页并刷新</a>
      <input type="hidden" name="id" value="{$distributionShopHotWords.id}"/>
      <button type="submit" class="btn btn-primary submit" data-loading-txt="提交中，请稍后……" data-ajax-url="__CONTROLLER__/save">保存更改</button>
    </div>
  </div>
  
</form>

<!-- uploadify -->
<link rel="stylesheet" href="__PUBLIC__/Style/Partner/Default/uploadify/uploadify.css">
<script type="text/javascript" src="__PUBLIC__/Style/Partner/Default/uploadify/jquery.uploadify.min.js?{:time()}{:rand(0,9999)}"></script>
<script>
$(function() {
    $("#image_upload").uploadify({
        'multi'			:	false,
        'fileSizeLimit' : 	'200kb',
        'buttonText'	:	'选择图片',
        'fileTypeDesc' 	: 	'Image Files',
        'fileTypeExts' 	: 	'*.jpg; *.png',
        'swf'			: 	'__PUBLIC__/Style/Partner/Default/uploadify/uploadify.swf',
        'uploader'		: 	'__MODULE__/Upload/uploadOne',
        'onUploadSuccess'	: function(data, res) {
        	var url = eval("(" + res + ")").extra.url;
        	$("#msg-privew .msg-cover img").attr("src", url);
        	$("#img-url").val( url );
        }
    });
});
</script>